package org.zachary.creditbusiness.commodityandhouse.entity;

import com.baomidou.mybatisplus.annotation.*;
import java.math.BigDecimal;
import java.sql.Timestamp;

@TableName("commodity_order")
public class CommodityOrder {

    @TableId(type = IdType.AUTO)
    private Integer id;
    private   Integer  userId;
    private Integer commodityId;
    private String method; // 支付方式：0-立即支付，1-货到付款
    private Integer amount; // 商品数量
    private BigDecimal price; // 总金额
    private String address; // 收货地址
    private Timestamp orderTime; // 下单时间
    private Timestamp payTime; // 支付时间
    private Byte finished; // 订单状态：1-货到付款待支付，2-已完成
    private Double freightAmount; // 运费（固定20元）
    private Double discountAmount; // 折扣金额
    private Double actualAmount; // 实际付费
    // Getters and Setters

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer  getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getCommodityId() { // 新增 getter
        return commodityId;
    }

    public void setCommodityId(Integer commodityId) { // 新增 setter
        this.commodityId = commodityId;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }



    public Timestamp getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(Timestamp orderTime) {
        this.orderTime = orderTime;
    }

    public Timestamp getPayTime() {
        return payTime;
    }

    public void setPayTime(Timestamp payTime) {
        this.payTime = payTime;
    }

    public Byte getFinished() {
        return finished;
    }

    public void setFinished(Byte finished) {
        this.finished = finished;
    }

    public Double getFreightAmount() {
        return freightAmount;
    }

    public void setFreightAmount(Double freightAmount) {
        this.freightAmount = freightAmount;
    }

    public Double getDiscountAmount() {
        return discountAmount;
    }

    public void setDiscountAmount(Double discountAmount) {
        this.discountAmount = discountAmount;
    }

    public Double getActualAmount() {
        return actualAmount;
    }

    public void setActualAmount(Double actualAmount) {
        this.actualAmount = actualAmount;
    }



}
